package com.zhejiangzhengyuan.municipal_common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 问题点与文件关联表，问题点与文件的一对多关联关系。
 *
 * @author linju
 * @since 2020-01-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "ProblemsFileMapping对象", description = "问题点与文件关联表，问题点与文件的一对多关联关系。")
public class ProblemsFileMapping extends Model<ProblemsFileMapping> {

  private static final long serialVersionUID = 1L;

  @ApiModelProperty(value = "自增主键")
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  @ApiModelProperty(value = "问题点Id")
  private Long problemsId;

  @ApiModelProperty(value = "文件表主键做外键")
  private Long fileId;

  @ApiModelProperty(value = "记录创建时间")
  private Timestamp createTime;

  @ApiModelProperty(value = "记录更新时间")
  private Timestamp updateTime;

  @ApiModelProperty(value = "文件状态")
  private String rectify;

  @Override
  protected Serializable pkVal() {
    return this.id;
  }
}
